package com.lagou.demo.controller;

import com.lagou.demo.service.IDemoService;
import com.lagou.edu.mvcframework.annotations.LagouAutowired;
import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.Security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@LagouController
@LagouRequestMapping("/admin")

public class AdminController {

    @LagouRequestMapping("/index")
    @Security(value={"zhangsan","lisi"})
    public String index(HttpServletRequest request, HttpServletResponse response,String username) {
        request.setAttribute("username", username);
        return "index";
    }

}
